<template>
  <div class="home">
    <column-list :list="list"></column-list>
  </div>
</template>

<script lang="ts">
import { defineComponent, computed, onMounted } from 'vue'
import ColumnList from '@/components/ColumnList.vue'
import { useStore } from 'vuex'
import { GlobalDataProps } from '@/store'
export default defineComponent({
  name: "HomePage",
  components: { ColumnList },
  setup() {
    onMounted(() => {
      store.dispatch('getColumnsList')
    })
    const store = useStore<GlobalDataProps>()
    const list = computed(() => store.state.columns)
    return {
      list: list
    }
  }
})
</script>

<style scoped lang="less">
.home {
  min-height: 500px;
}
</style>
